Copying Attr Values

FYI.  I found the following perm that copies attr values.  I have found nothing wrong with this perm and am conficent it is superior to any other method where you stage the value in an attribute.  It seems to NOT use the string table and can therefore be used to copy 1000s of values in a single script.  OLE are copied OK.

Object oTo = object that wants new attr value

Object oFrom = object with attr value to be copied

string NameAttrTo  = Name of Attr to be updated

string NameAttrFrom = Name of Attr to be copied

noError()

set(oTo.NameAttrTo, oFrom.NameAttrFrom)

string ErrMess = lastError()

-Louie

 

 


llandale - Mon Nov 25 10:29:52 EST 2013

Re: Copying Attr Values
pommCannelle - Thu Nov 28 04:52:22 EST 2013

Thx Louie .... always usefull to read your posts ;)

Re: Copying Attr Values
Searil - Thu Nov 28 05:03:55 EST 2013

I need some help about the running the dxl script in the background with command line. Could you please look into the this question ? 

https://www.ibm.com/developerworks/community/forums/html/topic?id=4b0b639d-8081-4c40-a10e-1622f10ac3b4&ps=25

There is no much source for dxl and I am fairly new about this issue.

 

Thanks in advance.

Re: Copying Attr Values
llandale - Thu Dec 05 13:34:12 EST 2013

Searil - Thu Nov 28 05:03:55 EST 2013

I need some help about the running the dxl script in the background with command line. Could you please look into the this question ? 

https://www.ibm.com/developerworks/community/forums/html/topic?id=4b0b639d-8081-4c40-a10e-1622f10ac3b4&ps=25

There is no much source for dxl and I am fairly new about this issue.

 

Thanks in advance.

"In Background" would mean "Batch Mode".   99% of the time you would write a script with these characteristics:

  • It starts
  • It hard-codes the names of whatever Projects/Folders/Modules are relevant
  • It does whatever it does
  • It ends, which ends the DOORS batch session.

Usually you would use the "-b" batch command line switch, which opens DOORS without any GUI, runs after initialization, and ends DOORS when finished.  If you use the "-d" DXL switch, it will run with the familiar GUI but NOT end DOORS; which doesn't make sense to me for background processing but may make some sense as a desktop shortcut.

The following debug sequence may be reasonable:

  • Get the script to work via the DXL window.
  • Get the script to work using the "-d" switch, which leaves DOORS running so you can explorer and find problems after the script runs
  • Get the script to work using the "-b" switch.  New errors will be discovered here such as if your script tries to "ack" or otherwise interact with the user; which is disallowed since there is no GUI.  The following may help if the script needs to be flexible:
    • if (batchMode())  //
    • then  do not ack or ask the user anything; default it all
    • else go ahead and ack or ask the user questions
    • ... or ...
    • create the dialog with all DBEs with default settings; do not realize nor show it.
    • if (batchMode())
    • then call the main "OK" button or apply callback; which reads
    • else realize and show the dialog
  • Use Windows Scheduler to run the batch script at night.

-Louie